package com.lx.idgenerator.autoconfigure;

import com.lx.idgenerator.autoconfigure.redis.RedisConfiguration;
import com.lx.idgenerator.autoconfigure.redis.RedisProperties;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * @author lX
 * @version JDK 8
 * @className IdGeneratorAutoConfiguration (此处以class为例)
 * @date 2024/10/24
 * @description ID生成器自动配置类
 */
@Configuration
@EnableConfigurationProperties({IdGeneratorProperties.class,RedisProperties.class})
@Import(RedisConfiguration.class)
public class IdGeneratorAutoConfiguration {

  @Configuration
  @ConditionalOnProperty(prefix = "id.gen.segment", name = "storage", havingValue = "redis")
  @Import(RedisConfiguration.class)
  public static class ConditionalConfiguration {
  }



}
